define(['zepto'],function($){
	function itemShow(el){
		var $element = el.element;
		var $container=el.container;
		var defaultClass=el.defaultClass;
		var elementLevel=el.elementLevel;
		var actClass=el.actClass;
		var prevNav=-1;
		var requestCount=0;     //请求数据
		function removeSlide(){
			var temp=$container.eq(prevNav).find("."+actClass);	
			if(temp){
				temp.removeClass(actClass);
				$container.eq(prevNav).removeClass('dragAction');
				var t=$container.eq(prevNav).find('.secondNav');
				if(t.length>0){
					t.animate({height: "0"}, 300);
				}
			}
		}
		$element.on('click',function(){			
			var self=this;
			var currentNav;
			if(elementLevel==2){
				currentNav=$(self).parent().parent().index();
				self=$(self).find("."+defaultClass);
			}
			if(elementLevel==4){
				currentNav=$(self).parent().parent().parent().parent().index();
				self=$(self).filter("."+defaultClass);
				$container.eq(currentNav).addClass('dragAction');
			}	
			if(self.hasClass(actClass)){
				prevNav=currentNav;
				removeSlide();
				prevNav=-1;
			}
			else{
				$(self).addClass(actClass);
				var dropDownListNode=$container.eq(currentNav).find('.secondNav');
				
				if(dropDownListNode.length>0){
					var heightShow=$container.eq(currentNav).find('.navItem2').height();
					var length=$container.eq(currentNav).find('.navItem2').length;
					dropDownListNode.animate({height:heightShow*length}, 300)
				}
				if(prevNav!=-1&&prevNav!=currentNav){
					removeSlide();
				}
				prevNav=currentNav;	
			}			
		});	
	}
	return itemShow;	
})